<?php

namespace App\Http\Controllers\App;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class BaseController extends Controller
{
    public $pagesize = 10 ;//默认一页10条
    public $user_id  = '' ;//用户ID
    /**
     * 验证是否登录
     *
     * @param [type] $method
     * @param [type] $parameters
     * @return void
     */
    public function callAction($method, $parameters)
    {

        if ( !session('user_id')) {

           return self::error('请先登录', 301);

        }

        return call_user_func_array([$this, $method], $parameters);
        
    }

    
}
